package apistore

import (
	"crypto/md5"
	"encoding/hex"
)

func Sign(str string, key string) string {
	if str == "" || key == "" {
		return ""
	}

	strForSign := str + key
	h := md5.New()
	h.Write([]byte(strForSign))

	return hex.EncodeToString(h.Sum(nil))
}
